<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/AccountsDetail.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
      :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields"
      :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/mall/AccountsDetail.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: "internal_id_fk",
        footer: "Foots",
        cnName: "应收明细",
        name: "AccountsDetail",
        url: "/AccountsDetail/",
        sortName: "createDate",
        // paginationSize: 99999999,
        // paginationHide: true,
      },
      extend: extend,
      editFormFields: {
        merchantCode: "",
        merchantName: "",
      },
      editFormOptions: [],
      // searchFormFields: {},
      // searchFormOptions: [],
      searchFormFields: {
        out_order_id: "",
        order_id: "",
        account_code: "",
        customer_name: "",
        customer_phone: "",
        type_func: "",
        internal_id_fk: "",
        // notes: "",
        createDate: "",
      },
      searchFormOptions: [
        [
          {
            title: "账户名称",
            field: "account_code",
            type: "select",
            dataKey: "accounts"
          },
          { title: "流水单号", field: "internal_id_fk", type: "like" },
          { title: "订单号", field: "order_id", type: "like" },
          { title: "凭证号", field: "out_order_id", type: "like" },
          //{"title":"应收账户编号","field":"account_code","type":"like"},
        ],
        [
          { field: "createDate", title: "入账时间", type: "datetime", requiredDatetime: true },
          { title: "客户姓名", field: "customer_name", type: "like" },
          { title: "手机号", field: "customer_phone", type: "like" },
          // { title: "财务备注", field: "notes", type: "like" },
          {
            title: "类型",
            field: "type_func",
            type: "select",
            dataKey: "type_func",
          },
        ],
        // [
        //   {
        //     title: "类型",
        //     field: "type_func",
        //     type: "select",
        //     dataKey: "type_func",
        //   },
        // ],
      ],
      columns: [
        //    {field:'business_date',title:'营业日期',type:'date',width:120,align:'left',sortable:true},
        {
          field: "createDate",
          title: "入账时间",
          type: "datetime",
          width: 150,
          align: "left",
          sortable: true,
        },
        {
          field: "account_code",
          title: "账户名称",
          type: "string",
          width: 150,
          bind: { key: "accounts", data: [] },
          require: true,
          align: "left",
          sortable: true,
        },
        {
          field: "type_func",
          title: "类型",
          bind: { key: "type_func", data: [] },
          type: "int",
          width: 90,
          require: true,
          align: "left",
        },
        {
          field: "internal_id_fk",
          title: "流水单号",
          type: "string",
          width: 220,
          require: true,
          align: "left",
        },
        {
          field: "order_id",
          title: "订单号",
          type: "string",
          width: 220,
          require: true,
          align: "left",
        },
        {
          field: "out_order_id",
          title: "凭证号",
          type: "string",
          width: 200,
          require: true,
          align: "left",
        },
        {
          field: "customer_name",
          title: "客户姓名",
          type: "string",
          width: 130,
          align: "left",
        },
        {
          field: "customer_phone",
          title: "手机号",
          type: "string",
          width: 130,
          align: "left",
        },
        //    {field:'business_date',title:'营业日期',type:'datetime',width:120,align:'left',hidden:true,sortable:true,},
        //    {field:'business_time',title:'营业日业务产生时间',type:'datetime',width:150,align:'left',sortable:true,hidden:true},
        //    {field:'type_record',title:'类型', bind: { key: "type_record", data: [] },type:'int',width:100,require:true,align:'left'},
        {
          field: "amount_total",
          title: "往来金额",
          type: "decimal",
          width: 120,
          align: "left",
        },
        //    {field:'amount_recharge',title:'充值消费金额',type:'decimal',width:120,align:'left'},
        //    {field:'amount_credit',title:'授信消费金额',type:'decimal',width:120,align:'left'},
        //    {field:'verify_status',title:'核销核验',bind: { key: "verify_status", data: [] },type:'int',width:90,align:'left'},
        //    {field:'verify_amount',title:'已核销核验金额',type:'decimal',width:120,align:'left'},
        //    {field:'noverify_amount',title:'未核销核验金额',type:'decimal',width:120,align:'left'},
        {
          field: "balance",
          title: "交易后余额",
          type: "decimal",
          width: 120,
          align: "left",
        },
        {
          field: "verify_by",
          title: "操作人",
          type: "string",
          width: 90,
          align: "left",
        },
        {
          field: "verify_datetime",
          title: "操作日期",
          type: "datetime",
          width: 90,
          align: "left",
          sortable: true,
        },
        // {
        //   field: "notes",
        //   title: "财务备注",
        //   type: "string",
        //   width: 300,
        //   align: "left",
        // },
        //    {field:'is_valid',title:'是否有效', bind: { key:"enabledStatus", data: [] },type:'int',width:90,align:'left'},
        //    {field:'is_delete',title:'逻辑删除标志',type:'int',width:90,align:'left'},
        //    {field:'timesapn',title:'时间戳',type:'datetime',width:90,align:'left',sortable:true},
        //    {field:'modifier',title:'修改人',type:'string',width:120,align:'left'},
        //    {field:'modifyDate',title:'修改时间',type:'datetime',width:120,align:'left',sortable:true},
        //    {field:'modifyID',title:'修改人ID',type:'int',width:120,hidden:true,align:'left'},
        //    {field:'createDate',title:'创建时间',type:'datetime',width:120,align:'left',sortable:true},
        //    {field:'createID',title:'创建人ID',type:'int',width:120,hidden:true,align:'left'},
        //    {field:'creator',title:'创建人',type:'string',width:120,align:'left'}
      ],
      detail: {
        cnName: "#detailCnName",
        columns: [],
        sortName: "",
        key: "",
      },
    };
  },
};
export default vueParam;
</script>
